package com.llb666.shop.items.infrastructure.conver;

import com.llb666.shop.items.domain.entity.ItemsSpec;
import com.llb666.shop.items.infrastructure.po.ItemsSpecPo;
import org.mapstruct.Mapper;
import org.mapstruct.ReportingPolicy;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * 商品规格类型转换器 po -- entity
 *
 * @author llb666
 */
@Mapper(unmappedTargetPolicy = ReportingPolicy.IGNORE)
public interface ItemsSpecCvt {
    ItemsSpecCvt INSTANCE = Mappers.getMapper(ItemsSpecCvt.class);

    ItemsSpecPo do2po(ItemsSpec itemsSpec);

    ItemsSpec po2do(ItemsSpecPo itemsSpecPo);

    List<ItemsSpec> po2doList(List<ItemsSpecPo> itemsSpecPolist);
}
